//
//  SAMatrixUtil.h
//  GameFrame
//
//  Created by Hiroshi Nomura on 2014/04/22.
//  Copyright (c) 2014年 Hiroshi Nomura. All rights reserved.
//

#ifndef GameFrame_SAMatrixUtil_h
#define GameFrame_SAMatrixUtil_h

void populatePerspectiveMatrix4x4(float fov, float aspect, float near, float far, Matrix4x4 result);

void populateIdentityMatrix4x4(Matrix4x4 result);

void inverseMatrix4x4(Matrix4x4 mtx);

void transposeMatrix4x4(Matrix4x4 src_mtx, Matrix4x4 mtx);

void translateMatrix4x4(Matrix4x4 mtx, float x, float y, float z);

void scaleMatrix4x4(Matrix4x4 mtx, float x, float y, float z);

void rotateXMatrix4x4(Matrix4x4 mtx, float rad);

void rotateYMatrix4x4(Matrix4x4 mtx, float rad);

void rotateZMatrix4x4(Matrix4x4 mtx, float rad);

void multiplyMatrix4x4ByMatrix4x4(Matrix4x4 lmtx, Matrix4x4 rmtx, Matrix4x4 result);

void multiplyMatrix4x4ByVector4D(Matrix4x4 lmtx, Vector4D rvec);

void multiplyQuaternionByQuaternion(Vector4D lvec, Vector4D rvec, Vector4D result);

void convertMatrix4x4ToQuaternion(Matrix4x4 mtx, Vector4D vec);

void convertQuaternionToMatrix4x4(Vector4D vec, Matrix4x4 mtx);

#endif
